<%--
  Created by IntelliJ IDEA.
  User: Y
  Date: 2022/12/1
  Time: 20:01
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>el表达式的注意事项</title>
</head>
<body>
<h1 style="width: 100%;text-align: center">el表达式的注意事项</h1>
<%
    String username  = null;
    request.setAttribute("username",username);

    int number  []  = {2,3,4,5,5};
    session.setAttribute("number",number);
%>


<div>
    1.el表达式没有null（也没有空指针错误）
    ${username}
    ${username.equals("张三")}
    <br>
    2.el表达式没有数组越界异常 ${number[9999]}
    <br>
    3.el表达式没有字符串的拼接
<%--    ${"张三"+"在好好上课"}--%>
    ${"张三"}${"在好好上课"}
</div>
</body>
</html>
